package software_construction.DesignProject.d2_LSP.demo1;

public class Bird {
    protected double runSpeed;
    protected double flySpeed;

    public void setRunSpeed(double runSpeed) {
        this.runSpeed = runSpeed;
    }

    public void setFlySpeed(double flySpeed) {
        this.flySpeed = flySpeed;
    }

    public double calcuFlyTime(double distance){
        return distance/flySpeed;
    }

    public double calcuRunTime(double distance){
        return distance/runSpeed;
    }
}
